<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

defined('_JEXEC') or die('Restricted Access');
JHtml::_('behavior.tooltip');

include(JPATH_ROOT.DS."administrator".DS."components".DS."com_surveys".DS."left.php");

$document =& JFactory::getDocument();
$document->addStyleSheet("components/com_surveys/css/survey.css");

$survey_id = JRequest::getVar("s_id", "0");
$db =& JFactory::getDBO();
$sql = "select title from #__ijoomla_surveys_surveys where id=".intval($survey_id);
$db->setQuery($sql);
$db->query();
$title = $db->loadResult();

?>
<form name="adminForm" id="adminForm">
	<table>
		<tr>
			<td align="left" width="60%">
				<span class="sectionname"><?php echo JText::_("COM_SURVEYS_RESULTS_SUMMARY"); ?></span>
				<h2 style="color: rgb(102, 153, 0);">Survey: <?php echo $title; ?></h2>
				Click to <b>Response Total</b> of <b>Answer X </b>in <b>Question Y</b> to Filter Respondents choose <b>X</b> in <b>Question Y</b>
			</td>
			<td align="right" width="40%">
				<input type="button" value="Export Data" onclick="document.adminForm.task.value='export'; document.adminForm.controller.value='export'; document.adminForm.submit();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a class="video" href="http://www.ijoomla.com/redirect/survey/videos/export.htm" target="_blank">Video Tutorial <img src="components/com_surveys/images/icon_video.gif"></a>
			</td>					
		</tr>
	</table>
	
	<br /><br />
	
	<table width="100%">
		<tr>
			<td width="100%">
				<?php echo $this->getStatistics(); ?>
			</td>
		</tr>
	</table>
		
	<input type="hidden" name="option" value="com_surveys" />
	<input type="hidden" name="controller" value="statistics" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="survey_id" value="<?php echo JRequest::getVar("s_id", "0"); ?>" />
</form>

</td></tr></table>
<p><center><?php echo JText::_("COM_IJOOMLA_SURVEYS_POWERED_BY") ; ?>&nbsp;<a href='http://www.ijoomla.com' target='_blank'><?php echo JText::_("COM_SURVEYS_SURVEY"); ?></a></center></p>	